package com.ushine.web.template.transactional.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @Author: yls
 * @Date 2022/2/14 10:57
 * @Description: 事务控制测试实体类
 * @Version 1.0
 **/
@Data
@ApiModel(description = "事务控制测试类")
@Entity
@Table(name = "t_cp_transaction_second")
@org.hibernate.annotations.Table(appliesTo = "t_cp_transaction_second", comment = "事务控制测试类")
@TableName(value = "t_cp_transaction_second", autoResultMap = true)
public class SecondTransactionDO {

    /**
     * 用户ID
     */
    @ApiModelProperty("用户id")
    @Id
    @TableId(type = IdType.ASSIGN_ID)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @Column(name = "id", columnDefinition = "bigint comment '编号'")
    private Long id;

    /**
     * 用户名
     */
    @ApiModelProperty("用户名")
    @Column(name = "username", columnDefinition = "varchar(255) comment '用户名'")
    private String username;


}
